import moment from 'moment'
export function installFilters(Vue) {
  Vue.filter('datetime', function(value, format = 'YYYY-MM-DD') {
    value = value && parseInt(value)
    return moment(value).format(format)
  })
  Vue.filter('downImg', function(value) {
    return `/api/v1/file/download?fileId=${value}`
  })
}
